package com.cn.system.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class PageNavigation {

  @GetMapping
  public String index(String page) {
    if (page == null || "index".equalsIgnoreCase(page)) {
      return "index";
    } else if ("group".equalsIgnoreCase(page)){
      return "group";
    } else if ("statistics".equalsIgnoreCase(page)){
      return "statistics";
    } else {
      return "index";
    }
  }
}
